package cn.tedu.sync.reentrant;

public class SyncLockReentrantDemo {

    public static void main(String[] args) {
        // synchronized 可重入演示
        SyncLockReentrantDemo reentrantLock = new SyncLockReentrantDemo();
        reentrantLock.setA();
    }




    public  synchronized void setA(){
        setB();
        System.out.println("I`m  A");

    }
    public  synchronized void setB(){
        System.out.println("I`m  b");
    }

}
